<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="../00-source//jquery.min.js"></script>
    <style>
        *{
            margin: 0;
            padding: 0;
        }
        div{
            width: 100px;
            height: 100px;
            padding: 20px;
            border: 1px solid black;
        }
    </style>
</head>
<body>
    <div>

    </div>
    <script>
        // width(),height()  内容的宽高
        console.log($('div').width());

        // innerWidth(),innerHeight() 内容宽高+padding
        console.log($('div').innerWidth());

        // outerWidth(),outerHeight() 内容宽高+padding+border
        console.log($('div').outerWidth());

        // outerWidth()里如果传入true，则会把margin也算上
        console.log($('div').outerWidth(true));
    </script>
</body>
</html>